import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire from '@dfeidao/atom-web/msg/fire';

import get from '@dfeidao/atom-web/local/get';


import error from '@dfeidao/atom-web/msgbox/error';
import a003 from './a003';
// 确定
export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// const id = fd.data.ss;
	// const name = fd.data.aa;
	const id = get(fd, 'ss');
	const name = get(fd, 'aa');
	if (!id) {
		error('请选择一条数据');
		return;
	}
	// fire(fd.data.compen, fd.data.event, { id, name });
	fire(get(fd, 'compen'), get(fd, 'event'), { id, name });

	await a003(fd);
}
